package ldh.im.fxgui.component.cell;


import javafx.scene.image.ImageView;
import ldh.im.fxbase.data.pojo.ImUser;

import static ldh.im.fxgui.util.UserHeadImageUtil.getHeadImage;

public class UserIconView extends ImageView {

    private ImUser imUser;

    public UserIconView(ImUser imUser) {
        this.imUser = imUser;
        initUi();
    }

    private void initUi() {
        this.setImage(getHeadImage(imUser.getHeadImg()));
        this.setFitHeight(36);
        this.setFitWidth(36);
    }
}
